package cn.xiaobai.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * 计划配置
 *
 * @Author yangdaji
 * @Date 2024/5/4
 * @PackageName cn.xiaobai.config
 * @ClassName PlanProperties
 */
@Data
@ConfigurationProperties(prefix = "plan")
public class PlanProperties {

    private String hour = "9";

    private String min = "0";

    /**
     * 是否马上执行
     */
    private Boolean always = false;

    /**
     * 一次性, 执行完毕后关闭
     */
    private Boolean oneTime = false;

    /**
     * 指定时分, 默认在周一执行
     */
    private final String cronTemplate = "0 %s %s * * 1";
}
